import config from "@/config";
import http from "@/utils/request";

export default {
	page: {
		url: `${config.API_URL}/business/field/page`,
		name: "分页列表",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	dicList: {
		url: `${config.API_URL}/business/field/dicList`,
		name: "领域字典",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	detail: {
		url: `${config.API_URL}/business/field/detail`,
		name: "详情",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	add: {
		url: `${config.API_URL}/business/field/add`,
		name: "新增",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	update: {
		url: `${config.API_URL}/business/field/update`,
		name: "修改",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	delete: {
		url: `${config.API_URL}/business/field/delete`,
		name: "删除",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	batchDelete: {
		url: `${config.API_URL}/business/field/batchDelete`,
		name: "批量删除",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	fieldExpert: {
		url: `${config.API_URL}/business/field/fieldExpert`,
		name: "领域下关联专家",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	unFieldExpert: {
		url: `${config.API_URL}/business/field/unFieldExpert`,
		name: "领域未关联专家",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	unCurrentFieldExpert: {
		url: `${config.API_URL}/business/field/unCurrentFieldExpert`,
		name: "获取该领域列表专家-未分配",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	currentFieldExpert: {
		url: `${config.API_URL}/business/field/currentFieldExpert`,
		name: "领域下关联专家",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	grantFieldExpert: {
		url: `${config.API_URL}/business/field/grantFieldExpert`,
		name: "关联领域专家",
		post: async function (params) {
           console.log(params)
			return await http.post(this.url, params);
		},
	},
	cancelFieldExpert: {
		url: `${config.API_URL}/business/field/cancelFieldExpert`,
		name: "取消关联领域专家",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	allotArticleExpert: {
		url: `${config.API_URL}/business/field/allotArticleExpert`,
		name: "文稿分配领域专家",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	anewAllotArticleExpert: {
		url: `${config.API_URL}/business/field/anewAllotArticleExpert`,
		name: "文稿分配领域专家",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},

};
